package com.github.calvin.view.screenShot;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.github.calvin.R;
import com.github.library.screenShot.ClipImageLayout;


/**
 * Created by Calvin.Wang on 12/4/2014.
 */
public class PhotoFragment extends Fragment {
    private ClipImageLayout clipImageLayout;
    private String imagePath;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        imagePath = getArguments().getString("ImagePath");
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_photocut, null);
        clipImageLayout = (ClipImageLayout) view.findViewById(R.id.clipImageLayout);
        clipImageLayout.setHorizontalPadding(80);
        clipImageLayout.show(view.getContext(), imagePath);
        return view;
    }

    @Override
    public void onPause() {
        super.onPause();
    }


}
